Fix @azureBaseType doc example to reference a real resource model#4755
@azureBaseType doc example to reference a real resource model#4755Conversation
The example previously referenced non-existent spreads (AgentProperties is internal, AgentToolProperty does not exist). Replace with a compilable resource-model example that shows the decorator applied to a TrackedResource, matching actual usage in the codebase. Regenerate reference docs. Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
@azureBaseType doc example to reference a real resource model@azureBaseType doc example to reference a real resource model
| * @example | ||
| * ```typespec | ||
| * @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" }) | ||
| * model MyAgentProperties { |
There was a problem hiding this comment.
These samples are still not realistic. Use the 'ContosoApplianceDefinition, ContosoApplianceProperties and ContosoApplianceAgent definitio0ns from the agent sample spec: https://github.com/Azure/typespec-azure/blob/main/packages/samples/specs/resource-manager/resource-types/agent/main.tsp
To make the agent you will decorate with the decorator.
There was a problem hiding this comment.
Updated the example to use ContosoApplianceDefinition, ContosoApplianceProperties, and ContosoApplianceAgent from the agent sample spec. Also merged latest main, rebuilt, regenerated docs, and formatted.
…etype-doc-example Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
…ample spec Use ContosoApplianceDefinition, ContosoApplianceProperties, and ContosoApplianceAgent from the agent sample spec for a realistic example. Merge latest main, rebuild, regenerate docs, and format. Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
All changed packages have been documented.
Show changes
|
commit: |
|
You can try these changes here
|
The
@azureBaseTypedoc example referenced...AgentProperties(which isinternal) and...AgentToolProperty(which does not exist), making it non-compilable.Replaced with a valid example showing the decorator applied to a
TrackedResourcemodel, matching actual usage:lib/base-types/base-types.tsp— corrected the@exampleblockgenerated-defs/Azure.ResourceManager.BaseTypes.ts,README.md,reference/decorators.md— regenerated viapnpm regen-docs